package svc

import (
    "github.com/zeromicro/go-zero/zrpc"
    "zerorpc/app/gfzero/api/internal/config"
    "zerorpc/app/gfzero/rpc/loginclient"
)

type ServiceContext struct {
    Config config.Config

    LoginRpc loginclient.Login
}

func NewServiceContext(c config.Config) *ServiceContext {
    return &ServiceContext{
        Config:   c,
        LoginRpc: loginclient.NewLogin(zrpc.MustNewClient(c.LoginRpc)),
    }
}
